3.1050 \(\int \frac{(a c-b c x)^2}{a+b x} \, dx\)

Optimal. Leaf size=43 \[ \frac{4 a^2 c^2 \log (a+b x)}{b}+\frac{c^2 (a-b x)^2}{2 b}-2 a c^2 x \]

[Out]

-2*a*c^2*x + (c^2*(a - b*x)^2)/(2*b) + (4*a^2*c^2*Log[a + b*x])/b

________________________________________________________________________________________

Rubi [A]  time = 0.0143916, antiderivative size = 43, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.053, Rules used = {43} \[ \frac{4 a^2 c^2 \log (a+b x)}{b}+\frac{c^2 (a-b x)^2}{2 b}-2 a c^2 x \]

Antiderivative was successfully verified.

[In]

Int[(a*c - b*c*x)^2/(a + b*x),x]

[Out]

-2*a*c^2*x + (c^2*(a - b*x)^2)/(2*b) + (4*a^2*c^2*Log[a + b*x])/b

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin{align*} \int \frac{(a c-b c x)^2}{a+b x} \, dx &=\int \left (-2 a c^2+\frac{4 a^2 c^2}{a+b x}-c (a c-b c x)\right ) \, dx\\ &=-2 a c^2 x+\frac{c^2 (a-b x)^2}{2 b}+\frac{4 a^2 c^2 \log (a+b x)}{b}\\ \end{align*}

Mathematica [A]  time = 0.0061941, size = 31, normalized size = 0.72 \[ c^2 \left (\frac{4 a^2 \log (a+b x)}{b}-3 a x+\frac{b x^2}{2}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(a*c - b*c*x)^2/(a + b*x),x]

[Out]

c^2*(-3*a*x + (b*x^2)/2 + (4*a^2*Log[a + b*x])/b)

________________________________________________________________________________________

Maple [A]  time = 0.001, size = 35, normalized size = 0.8 \begin{align*}{\frac{{c}^{2}b{x}^{2}}{2}}-3\,a{c}^{2}x+4\,{\frac{{a}^{2}{c}^{2}\ln \left ( bx+a \right ) }{b}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-b*c*x+a*c)^2/(b*x+a),x)

[Out]

1/2*c^2*b*x^2-3*a*c^2*x+4*a^2*c^2*ln(b*x+a)/b

________________________________________________________________________________________

Maxima [A]  time = 1.02392, size = 46, normalized size = 1.07 \begin{align*} \frac{1}{2} \, b c^{2} x^{2} - 3 \, a c^{2} x + \frac{4 \, a^{2} c^{2} \log \left (b x + a\right )}{b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-b*c*x+a*c)^2/(b*x+a),x, algorithm="maxima")

[Out]

1/2*b*c^2*x^2 - 3*a*c^2*x + 4*a^2*c^2*log(b*x + a)/b

________________________________________________________________________________________

Fricas [A]  time = 1.4938, size = 81, normalized size = 1.88 \begin{align*} \frac{b^{2} c^{2} x^{2} - 6 \, a b c^{2} x + 8 \, a^{2} c^{2} \log \left (b x + a\right )}{2 \, b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-b*c*x+a*c)^2/(b*x+a),x, algorithm="fricas")

[Out]

1/2*(b^2*c^2*x^2 - 6*a*b*c^2*x + 8*a^2*c^2*log(b*x + a))/b

________________________________________________________________________________________

Sympy [A]  time = 0.296108, size = 34, normalized size = 0.79 \begin{align*} \frac{4 a^{2} c^{2} \log{\left (a + b x \right )}}{b} - 3 a c^{2} x + \frac{b c^{2} x^{2}}{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-b*c*x+a*c)**2/(b*x+a),x)

[Out]

4*a**2*c**2*log(a + b*x)/b - 3*a*c**2*x + b*c**2*x**2/2

________________________________________________________________________________________

Giac [A]  time = 1.0569, size = 61, normalized size = 1.42 \begin{align*} \frac{4 \, a^{2} c^{2} \log \left ({\left | b x + a \right |}\right )}{b} + \frac{b^{3} c^{2} x^{2} - 6 \, a b^{2} c^{2} x}{2 \, b^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-b*c*x+a*c)^2/(b*x+a),x, algorithm="giac")

[Out]

4*a^2*c^2*log(abs(b*x + a))/b + 1/2*(b^3*c^2*x^2 - 6*a*b^2*c^2*x)/b^2